#pragma once
#include "CaelumInternal.h"
#include "CaelumExternal.h"
#include "Window.h"
#include "RenderTarget.h"

namespace Caelum {

enum RenderMode {
	RENDERMODE_3D,
	RENDERMODE_2D
};

class RenderWindow : public Window, public RenderTarget
{
private:
	unsigned long WinDC;
	unsigned long WinRC;

	bool mOnlyRW;

	real mFOV;
protected:

public:
	RenderWindow(void) { }
	virtual ~RenderWindow(void) { }

	void Initialize(WindowParams &wp = WindowParams::BasicGameWindow, bool IsOnlyRenderWindow = true);

	void GetMetrics(uint &Width, uint &Height, uint &ColorDepth);
	uint GetWidth();
	uint GetHeight();
	uint GetColorDepth();

	inline real GetFieldOfView() { return mFOV; }
	///Remember to call SetRenderMode(RENDERMODE_3D) after calling this.
	inline void SetFieldOfView(real FOV) { mFOV = FOV; }

	void SetRenderMode(RenderMode Mode);

	void Update(bool SwapBuffers = true);
	void SwapBuffers(bool WaitForVSync = true);

	void Resizing(int NewW, int NewH);
};

}